#ifndef COMMON_H
#define COMMON_H

#include <QtCore>

void test();

#define DEBUG(x) qDebug()<< #x << "=" << x

struct Component
{
    QString name;
    QString description;

    struct Function
    {
    private:
        QString _name;
        QString _description;
        QString _example;
    public:
        Function(QString Name, QString Description = QString(), QString Example = QString()):
                _name(Name),
                _description(Description),
                _example(Example) {}
        void setDescription(QString desc)
        {
            _description = desc;
        }
        void setExample(QString example)
        {
            _example = example;
        }
        QString name() { return _name; }
        QString description() { return _description; }
        QString example() { return _example; }
    };
    QList<Function> functions;

    Component() : name("A component"), description("Компонент"){}
    Component(QString Name) : name(Name), description("Компонент") {}
    Component(QString Name, QString Description) : name(Name), description(Description) {}

};

#endif // COMMON_H
